-- GENERATED SPELL FOR [Shadowmoon Slayer] --


function spell0_22082(pUnit, Event) --@Debilitating Strike,n/a--
pUnit:FullCastSpellOnTarget(37577,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22082', 615, 1)
end

function spell1_22082(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(3019,pUnit)
pUnit:RegisterEvent('Sorts_22082', 15000, 1)
end

function Sorts_22082(pUnit, Event)
local choix_sorts_22082 = math.random(0, 1)
if choix_sorts_22082 == 0 then
pUnit:RegisterEvent('spell0_22082', 1, 1)
end
if choix_sorts_22082 == 1 then
pUnit:RegisterEvent('spell1_22082', 1, 1)
end
end

function mob22082_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22082', math.random(1500, 3000), 1)
end

function mob22082_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22082_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22082_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22082, 1, 'mob22082_Action')
RegisterUnitEvent(22082, 2, 'mob22082_Leave')
RegisterUnitEvent(22082, 3, 'mob22082_Kill')
RegisterUnitEvent(22082, 4, 'mob22082_Die')
